package com.awardsystem.Service;

import com.awardsystem.Dao.SCIDao;
import com.awardsystem.entity.Achievement;
import com.awardsystem.entity.SCI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.soap.Addressing;
import java.util.List;

@Service
public class SCIService {
    @Autowired
    SCIDao sciDao;

    public List<SCI> findAll(){return sciDao.findAll();}
    public SCI findByNumber(String number){return sciDao.findByNumber(number);}
    public SCI findByName(String name){return sciDao.findByName(name);};
    public void delete(SCI sci){sciDao.delete(sci);}
    public void save(SCI sci){sciDao.save(sci);}
    public SCI findById(int id){return sciDao.findById(id);}
    public List<SCI> findScisByAchievement(Achievement achievement){return sciDao.findSCISByAchievementListEquals(achievement);}
}
